<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>merry-go-round</title>
</head>
<style>
    body {
        margin: 0;
        width: 100%;
        height: 100%;
        background-color: black;
        display: flex;
        justify-content: center;
        /**近大远小*/
        perspective: 1500px;
    }

    .pic {
        width: 300px;
        height: 200px;
        display: flex;
        margin-top: 300px;
        /**开启3d*/
        transform-style: preserve-3d;
        animation: action 20s linear infinite;
    }

    .pic:hover {
        cursor: pointer;
        /**停止动画*/
        animation-play-state: paused;
    }

    img {
        width: 300px;
        height: 200px;
        position: absolute;
        /**添加倒影*/
        -webkit-box-reflect: below 15px -webkit-linear-gradient(transparent 10%, rgba(255, 255, 255, 0.5));
    }

    img:nth-child(1) {
        transform: translateZ(500px);
    }

    img:nth-child(2) {
        transform: rotateY(60deg) translateZ(500px);
    }

    img:nth-child(3) {
        transform: rotateY(120deg) translateZ(500px);
    }

    img:nth-child(4) {
        transform: rotateY(180deg) translateZ(500px);
    }

    img:nth-child(5) {
        transform: rotateY(240deg) translateZ(500px);
    }

    img:nth-child(6) {
        transform: rotateY(300deg) translateZ(500px);
    }

    @keyframes action {
        from {
            transform: rotateY(0deg);
        }

        to {
            transform: rotateY(360deg);
        }
    }
</style>

<body>
    <div class="pic">
        <img src="../public/img/1.jpg" />
        <img src="../public/img/2.jpg" />
        <img src="../public/img/3.jpg" />
        <img src="../public/img/4.jpg" />
        <img src="../public/img/5.jpg" />
        <img src="../public/img/6.jpg" />
    </div>
</body>

</html>